<script setup>
import {BaseImgUrl} from "../utils/lshttp";
import {ref} from "vue";

const isShowBackHome = ref(false)

const goBack = () => {
  if (isShowBackHome.value) {
    uni.switchTab({url: '/pages/index/index'})
  } else {
    uni.navigateBack()
  }
}
</script>

<template>
  <up-navbar title="助力开盲盒" :autoBack="true" bgColor="#FD333C00" leftIconColor="#FFFFFF">
    <template #left>
      <up-icon
          v-if="!isShowBackHome"
          name="arrow-left"
          size="19"
          color="#FFFFFF"
          @click="goBack"
      ></up-icon>
      <view class="u-nav-slot" v-else @click="goBack">
        <up-icon
            name="arrow-left"
            size="19"
            color="#FFFFFF"
        ></up-icon>
        <up-line
            direction="column"
            :hairline="false"
            length="16"
            color="#FFFFFF"
            margin="auto 8px"
        ></up-line>
        <up-icon
            name="home"
            size="20"
            color="#FFFFFF"
        ></up-icon>
      </view>
    </template>
    <template #center>
      <text style="color: white;font-size: 32rpx">为好友助力</text>
    </template>
  </up-navbar>
  <view style="background-color:#FEF3CE;height: 100%">
    <image :src="BaseImgUrl +'/mh/zlbj.png'"
           style="width: 750rpx;height: 1188rpx;position: absolute;z-index: 0"></image>
    <up-status-bar></up-status-bar>

<!--    <image :src="BaseImgUrl +'/mh/zlbj.png'" style="width: 750rpx;height: 288rpx;"></image>-->
    <view style="position: relative;display: flex;align-items: center;justify-content: center">

<!--      <view style="position: relative;color: #330601;font-size: 32rpx;font-weight: bold;padding-bottom: 16rpx;letter-spacing: 1rpx">-->
<!--        帮我助力开盲盒 你能百分百免费吃外卖-->
<!--      </view>-->
    </view>
  </view>
</template>

<style scoped lang="scss">
page{
  height: 100%;
}
.navbar {
  position: fixed;
  z-index: 1000;
  width: 100%;

  .back_content {
    display: flex;
    align-items: center;
    height: 44px;
  }
}
</style>